package com.action;

import com.service.UserPrivacyAlterService;
import com.vo.ResponseBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/user")
@CrossOrigin("*")
public class UserPrivacyAlterAction {

/**
 * @program: project
 *
 * @description: 接口：用户个人信息修改
 *
 * @author: Laoqi
 *
 * @create: 2019-11-24 19:41
 **/

    @Autowired
    private UserPrivacyAlterService userPrivacyAlter;

    /**
     *
     * @param map 用户所有资料
     * @param UserId  哪个用户？
     * @return
     */
    @RequestMapping("/UserPrivacyAlterAction")
    public ResponseBean UserPrivacyAlterAction(@RequestParam Map map, String UserId){
        Boolean f = userPrivacyAlter.UserPrivacyAlter(map, UserId);
        if (f){
            return new ResponseBean(0,0,"修改成功");
        }
        return new ResponseBean(200,0,"修改失败");
    }

}
